﻿
$(function () {
echarts_Purchasing_power_forecast();
// console.log`echarts_Price_Management`
echarts_Price_Management();
// console.log`echarts_Stock_management`
echarts_Stock_management();
// console.log`echarts_Stock_management_end`
// echarts_31();
// echarts_32();
// echarts_33();
// echarts_5();
// console.log`echarts_5`

echarts_faultWarning();

function echarts_Price_Management() {
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('echart_Price_Management'));

    option = {
        //  backgroundColor: '#00265f',
        legend: {
            top:'0%',
            textStyle: {
                color: 'rgba(255,255,255,.5)',
                fontSize:'12',
            },
            data: ['产品1', '产品2'],
            // 设置点击事件
            selected: {
                '数据1': true,
                '数据2': false
            },
            // 点击图例切换可见性
            // selectedMode: 'single'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: { type: 'shadow'}
        },
        grid: {
            left: '0%',
            top:'30px',
            right: '0%',
            bottom: '14%',
        containLabel: true
        },
        xAxis: [{
            type: 'category',
            data: ['1', '2', '3', '4', '5', '6','7','8','9','10','11','12'],
            name: '时间（月）',     //坐标轴单位
            nameTextStyle: {          
                padding: [30, 0, -30, -70],
                color: "rgba(255,255,255,.6)"
            },
            axisLine: {
                show: true,
                lineStyle: {
                        color: "rgba(255,255,255,.1)",
                        width: 1,
                        type: "solid"
                },
            },
        
            axisTick: {
                show: false,
            },
            axisLabel:  {
                interval: 0,
                // rotate:50,
                show: true,
                splitNumber: 15,
                textStyle: {
                    color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                },
            },
        }],
        yAxis: [{
            type: 'value',
            name: '售价（元）',
            nameTextStyle: {
                color: "rgba(255,255,255,.6)",
                padding: [0, 20, 0, 0],
            },
            axisLabel: {
            //formatter: '{value} %'
                show:true,
                textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize: '12',
                    },
            },
            axisTick: {
                show: false,
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: "rgba(255,255,255,.1	)",
                    width: 1,
                    type: "solid"
                },
            },
            splitLine: {
                lineStyle: {
                color: "rgba(255,255,255,.1)",
                }
            }
        }],
        series: [
            {
                name: '产品1',
                type: 'bar',
                data: [1500, 1200, 600, 200, 300, 300, 900,1500, 1200, 600, 200, 300, 300],
                barWidth:'35%', //柱子宽度
            // barGap: 1, //柱子之间间距
                itemStyle: {
                    normal: {
                        color:'#0184d5',
                        opacity: 1,
                        barBorderRadius: 5,
                    }
                }
            },
            {
                name: '产品2',
                type: 'bar',
                data: [400, 1700, 900, 500, 700, 700, 1500,1700, 900, 500, 700, 700, 1500],
                barWidth:'35%', //柱子宽度
            // barGap: 1, //柱子之间间距
                itemStyle: {
                    normal: {
                        color:'#27d08a',
                        opacity: 1,
                        barBorderRadius: 5,
                    }
                }
            },      
        ]
    };
      
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    window.addEventListener("resize",function(){
        myChart.resize();
    });
}

function echarts_faultWarning() {
    // Initialize the ECharts instance on the prepared DOM element.
    var myChart = echarts.init(document.getElementById('faultWarning'));

    // Sample data for ERP scenarios
    var scenarios = ['Inventory Management', 'Order Processing', 'Production Planning', 'Customer Relations'];
    var probabilities = [0, 5, 15, 20]; // Probabilities for each node

    // Color coding based on fault probability
    // var colors = probabilities.map(function(prob) {
    //     if (prob === 0) return 'green';
    //     if (prob > 0 && prob <= 10) return 'yellow';
    //     return 'red';
    // });

    // Fault records data (randomly generated for demonstration)
    var faultRecords = [
        {type: 'Inventory Shortage', time: '2022-10-01', repaired: 'Yes'},
        {type: 'Order Delay', time: '2022-10-02', repaired: 'No'},
        {type: 'Machine Downtime', time: '2022-10-03', repaired: 'Yes'},
        {type: 'Shipping Error', time: '2022-10-04', repaired: 'No'}
    ];

    // option = {
    //     // tooltip: {
    //     //     trigger: 'item',
    //     //     formatter: function(params) {
    //     //         return scenarios[params.dataIndex] + '<br>Probability: ' + probabilities[params.dataIndex] + '%';
    //     //     }
    //     // },
    //     // legend: {
    //     //     // orient: 'vertical',
    //     //     // left: 'right',
    //     //     // top: 'middle',
    //     //     // //data: ['产品1', '产品2', '产品3', '产品4', '产品5', '产品6', '产品7', '产品8', '产品9'],
    //     //     // data: ['产品1', '产品2', '产品3', '产品4', '产品5', '产品6'],
    //     //     textStyle: {
    //     //         color: 'rgba(255,255,255,.5)',
    //     //         fontSize: '12',
    //     //     }
    //     // },
    //     series: [
    //         {
    //             type: 'pie',
    //             radius: '50%',
    //             center: ['20%', '50%'],
    //                             avoidLabelOverlap: false,
    //             label: {
    //                 show: false,
    //                 position: 'center'
    //             },
    //             emphasis: {
    //                 label: {
    //                     show: true,
    //                     fontSize: '20',
    //                     fontWeight: 'bold',
    //                     color: "white"
    //                 }
    //             },
    //             labelLine: {
    //                 show: false
    //             },
    //             data: [
    //                 { value: 100, name: '产品1' }],
    //             // label: {
    //             //     show: true,
    //             //     formatter: '{b}: {c}%',
    //         // }
    //             color:"yellow"
    //
    //         }
    //     ]
    // };
    var sword_size = 13;
    option = {
    tooltip: {
        trigger: 'item',
        formatter: '{a} <br/>{b}: {c} ({d}%)'
    },
    series: [
        {
            name: '流水线1',
            type: 'pie',
            radius: '30%',
            center: ['25%', '20%'],
            data: [
                { value: 20, name: '正常', itemStyle: { color: '#06b4ab' } },
            ],
            label: {
                    show: false,
                    position: 'center'
                },
            emphasis: {
                label: {
                    show: true,
                    fontSize: '15',
                    fontWeight: 'bold'
                }
            }
        },
        {
            name: '流水线2',
            type: 'pie',
            radius: '30%',
            center: ['75%', '20%'],
            data: [
                { value: 25, name: '正常', itemStyle: { color: '#06b4ab' }  },
            ],
            label: {
                    show: false,
                    position: 'center'
                },
            emphasis: {
                label: {
                    show: true,
                    fontSize: '15',
                    fontWeight: 'bold'
                }
            }
        },
        {
            name: '流水线3',
            type: 'pie',
            radius: '30%',
            center: ['25%', '70%'],
            data: [
                { value: 2, name: '故障', itemStyle: { color: 'orange' }  }
            ],
            label: {
                    show: false,
                    position: 'center'
                },
            emphasis: {
                label: {
                    show: true,
                    fontSize: '15',
                    fontWeight: 'bold'
                }
            }
        },
        {
            name: '流水线4',
            type: 'pie',
            radius: '30%',
            center: ['75%', '70%'],
            data: [
                { value: 5, name: '正常', itemStyle: { color: '#06b4ab' }  }
            ],
            label: {
                    show: false,
                    position: 'center'
                },
            emphasis: {
                label: {
                    show: true,
                    fontSize: '15',
                    fontWeight: 'bold'
                }
            }
        }
    ],
    graphic: [
        {
            type: 'text',
            left: '21%',  // 对应 "流水线1" 饼图的水平位置
            top: '40%',   // 对应 "流水线1" 饼图的垂直位置稍下方
            style: {
                text: '流水线1',
                textAlign: 'center',
                fill: '#fff',
                fontSize: sword_size
            }
        },
        {
            type: 'text',
            left: '71%',  // 对应 "流水线2" 饼图的水平位置
            top: '40%',   // 对应 "流水线2" 饼图的垂直位置稍下方
            style: {
                text: '流水线2',
                textAlign: 'center',
                fill: '#fff',
                fontSize: sword_size
            }
        },
                {
            type: 'text',
            left: '21%',  // 对应 "流水线3" 饼图的水平位置
            top: '90%',   // 对应 "流水线3" 饼图的垂直位置稍下方
            style: {
                text: '流水线3',
                textAlign: 'center',
                fill: '#fff',
                fontSize: sword_size
            }
        },
                {
            type: 'text',
            left: '71%',  // 对应 "流水线4" 饼图的水平位置
            top: '90%',   // 对应 "流水线4" 饼图的垂直位置稍下方
            style: {
                text: '流水线4',
                textAlign: 'center',
                fill: '#fff',
                fontSize: sword_size
            }
        },
    ]
};

    // Set the configuration and data for the chart
    myChart.setOption(option);
    window.addEventListener("resize",function(){
        myChart.resize();
    });
}



function echarts_Stock_management() {
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('echart_Stock_management'));

    option = {
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b}: {c} ({d}%)'
        },
        legend: {
            orient: 'vertical',
            left: 'right',
            top: 'middle',
            //data: ['产品1', '产品2', '产品3', '产品4', '产品5', '产品6', '产品7', '产品8', '产品9'],
            data: ['产品1', '产品2', '产品3', '产品4', '产品5', '产品6'],
            textStyle: {
                color: 'rgba(255,255,255,.5)',
                fontSize: '12',
            }
        },
        series: [
            {
                name: '库存数量',
                type: 'pie',
                radius: ['50%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    show: false,
                    position: 'center'
                },
                emphasis: {
                    label: {
                        show: true,
                        fontSize: '20',
                        fontWeight: 'bold'
                    }
                },
                labelLine: {
                    show: false
                },
                data: [
                    { value: 100, name: '产品1' },
                    { value: 200, name: '产品2' },
                    { value: 150, name: '产品3' },
                    { value: 300, name: '产品4' },
                    { value: 180, name: '产品5' },
                    { value: 250, name: '产品6' }//,
                    // { value: 220, name: '产品7' },
                    // { value: 270, name: '产品8' },
                    // { value: 330, name: '产品9' }
                ]
            }
        ],
        //color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab', '#06c8ab', '#06dcab', '#06f0ab']
        color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab', '#06b4ab']
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    window.addEventListener("resize", function () {
        myChart.resize();
    });
}

function echarts_5() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart5'));

       option = {
  //  backgroundColor: '#00265f',
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    
    grid: {
        left: '0%',
		top:'10px',
        right: '0%',
        bottom: '2%',
       containLabel: true
    },
    xAxis: [{
        type: 'category',
      		data: ['浙江', '上海', '江苏', '广东', '北京', '深圳', '安徽', '四川'],
        axisLine: {
            show: true,
         lineStyle: {
                color: "rgba(255,255,255,.1)",
                width: 1,
                type: "solid"
            },
        },
        axisTick: {
            show: false,
        },
		axisLabel:  {
                interval: 0,
               // rotate:50,
                show: true,
                splitNumber: 15,
                textStyle: {
 					color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                },
            },
    }],
    yAxis: [{
        type: 'value',
        axisLabel: {
           //formatter: '{value} %'
			show:true,
			 textStyle: {
 					color: "rgba(255,255,255,.6)",
                    fontSize: '12',
                },
        },
        axisTick: {
            show: false,
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: "rgba(255,255,255,.1	)",
                width: 1,
                type: "solid"
            },
        },
        splitLine: {
            lineStyle: {
               color: "rgba(255,255,255,.1)",
            }
        }
    }],
    series: [{
        type: 'bar',
        data: [2, 3, 3, 9, 15, 12, 6, 4, 6, 7, 4, 10],
        barWidth:'35%', //柱子宽度
       // barGap: 1, //柱子之间间距
        itemStyle: {
            normal: {
                color:'#2f89cf',
                opacity: 1,
				barBorderRadius: 5,
            }
        }
    }
	]
};
      
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
	
function echarts_Purchasing_power_forecast() {
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('echart_Purchasing_power_forecast'));

    option = {
	    tooltip: {
            trigger: 'axis',
            axisPointer: {
                lineStyle: {
                    color: '#dddc6b'
                }
            }
        },
		legend: {
            top:'0%',
            data:['产品1','产品2'],
            textStyle: {
                color: 'rgba(255,255,255,.5)',
                fontSize:'12',
            }
        },
        grid: {
            left: '10',
            top: '30',
            right: '10',
            bottom: '40',
            containLabel: true
        },

        xAxis: [
            {
            type: 'category',
            boundaryGap: false,
            axisLabel:  {
                textStyle: {
 					color: "rgba(255,255,255,.6)",
					fontSize:12,
                },
                // formatter: '{value} day' // 在标签后添加单位
            },
            axisLine: {
                lineStyle: { 
                    color: 'rgba(255,255,255,.2)'
                }
            },

            data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', ],
            name: '时间（day）',     //坐标轴单位
            nameTextStyle: {          
                padding: [30, 0, -30, -70],
                color: "rgba(255,255,255,.6)"
            },
            }, 
            {

                axisPointer: {show: false},
                axisLine: {  show: false},
                position: 'bottom',
                offset: 20,
                
            }
        ],

    yAxis: [{
        type: 'value',
        axisTick: {show: false},
        axisLine: {
            lineStyle: {
                color: 'rgba(255,255,255,.1)'
            }
        },
        axisLabel:  {
                textStyle: {
 					color: "rgba(255,255,255,.6)",
					fontSize:12,
                },
                // formatter: '{value} 万元' // 在标签后添加单位
        },
        name: '金额（万元）', // 在坐标轴末端显示单位
        nameTextStyle: {
            color: "rgba(255,255,255,.6)",
            padding: [50, -40, 0, 0],
        },
        splitLine: {
            lineStyle: {
                 color: 'rgba(255,255,255,.1)',
            }
        }
    }],
    series: [
		{
            name: '产品1',
            type: 'line',
            smooth: true,
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                
                normal: {
                    color: '#0184d5',
                    width: 2
                }
            },
            areaStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(1, 132, 213, 0.4)'
                    }, {
                        offset: 0.8,
                        color: 'rgba(1, 132, 213, 0.1)'
                    }], false),
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                }
            },
                itemStyle: {
                normal: {
                    color: '#0184d5',
                    borderColor: 'rgba(221, 220, 107, .1)',
                    borderWidth: 12
                }
            },
            data: [3, 4, 3, 4, 3, 4, 3, 6, 2, 4, 2, 4,3, 4, 3, 4, 3, 4, 3, 6, 2, 4, 2, 4]
        }, 
        {
            name: '产品2',
            type: 'line',
            smooth: true,
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                
                normal: {
                    color: '#00d887',
                    width: 2
                }
            },
            areaStyle: {
                normal: {
                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                        offset: 0,
                        color: 'rgba(0, 216, 135, 0.4)'
                    }, {
                        offset: 0.8,
                        color: 'rgba(0, 216, 135, 0.1)'
                    }], false),
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                }
            },
                itemStyle: {
                normal: {
                    color: '#00d887',
                    borderColor: 'rgba(221, 220, 107, .1)',
                    borderWidth: 12
                }
            },
            data: [5, 3, 5, 6, 1, 5, 3, 5, 6, 4, 6, 4, 8, 3, 5, 6, 1, 5, 3, 7, 2, 5, 1, 4]
        }, 
	]

};
      
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }


    
function echarts_6() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echart6'));

        var dataStyle = {
	normal: {
		label: {
			show: false
		},
		labelLine: {
			show: false
		},
		//shadowBlur: 40,
		//shadowColor: 'rgba(40, 40, 40, 1)',
	}
};
var placeHolderStyle = {
	normal: {
		color: 'rgba(255,255,255,.05)',
		label: {show: false,},
		labelLine: {show: false}
	},
	emphasis: {
		color: 'rgba(0,0,0,0)'
	}
};
option = {
	color: ['#0f63d6', '#0f78d6', '#0f8cd6', '#0fa0d6', '#0fb4d6'],
	tooltip: {
		show: true,
		formatter: "{a} : {c} "
	},
	legend: {
		itemWidth: 10,
        itemHeight: 10,
		itemGap: 12,
		bottom: '3%',
		
		data: ['浙江', '上海', '广东', '北京', '深圳'],
		textStyle: {
                    color: 'rgba(255,255,255,.6)',
                }
	},
	
	series: [
		{
		name: '浙江',
		type: 'pie',
		clockWise: false,
		center: ['50%', '42%'],
		radius: ['59%', '70%'],
		itemStyle: dataStyle,
		hoverAnimation: false,
		data: [{
			value: 80,
			name: '01'
		}, {
			value: 20,
			name: 'invisible',
			tooltip: {show: false},
			itemStyle: placeHolderStyle
		}]
	},
		{
		name: '上海',
		type: 'pie',
		clockWise: false,
		center: ['50%', '42%'],
		radius: ['49%', '60%'],
		itemStyle: dataStyle,
		hoverAnimation: false,
		data: [{
			value: 70,
			name: '02'
		}, {
			value: 30,
			name: 'invisible',
			tooltip: {show: false},
			itemStyle: placeHolderStyle
		}]
	}, 
		{
		name: '广东',
		type: 'pie',
		clockWise: false,
		hoverAnimation: false,
		center: ['50%', '42%'],
		radius: ['39%', '50%'],
		itemStyle: dataStyle,
		data: [{
			value: 65,
			name: '03'
		}, {
			value: 35,
			name: 'invisible',
			tooltip: {show: false},
			itemStyle: placeHolderStyle
		}]
	},
		{
		name: '北京',
		type: 'pie',
		clockWise: false,
		hoverAnimation: false,
		center: ['50%', '42%'],
		radius: ['29%', '40%'],
		itemStyle: dataStyle,
		data: [{
			value: 60,
			name: '04'
		}, {
			value: 40,
			name: 'invisible',
			tooltip: {show: false},
			itemStyle: placeHolderStyle
		}]
	}, 
		{
		name: '深圳',
		type: 'pie',
		clockWise: false,
		hoverAnimation: false,
		center: ['50%', '42%'],
		radius: ['20%', '30%'],
		itemStyle: dataStyle,
		data: [{
			value: 50,
			name: '05'
		}, {
			value: 50,
			name: 'invisible',
			tooltip: {show: false},
			itemStyle: placeHolderStyle
		}]
	}, ]
};
      
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
function echarts_31() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb1')); 
option = {
   
	    title: [{
        text: '年龄分布',
        left: 'center',
        textStyle: {
            color: '#fff',
			fontSize:'16'
        }

    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
position:function(p){   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
        
top:'70%',
       itemWidth: 10,
        itemHeight: 10,
        data:['0岁以下','20-29岁','30-39岁','40-49岁','50岁以上'],
                textStyle: {
            color: 'rgba(255,255,255,.5)',
			fontSize:'12',
        }
    },
    series: [
        {
        	name:'年龄分布',
            type:'pie',
			center: ['50%', '42%'],
            radius: ['40%', '60%'],
                  color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],	
            label: {show:false},
			labelLine: {show:false},
            data:[
                {value:1, name:'0岁以下'},
                {value:4, name:'20-29岁'},
                {value:2, name:'30-39岁'},
                {value:2, name:'40-49岁'},
                {value:1, name:'50岁以上'},
            ]
        }
    ]
};
      
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
function echarts_32() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb2'));
option = {
   
	    title: [{
        text: '职业分布',
        left: 'center',
        textStyle: {
            color: '#fff',
			fontSize:'16'
        }

    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
position:function(p){   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
        
    top:'70%',
       itemWidth: 10,
        itemHeight: 10,
        data:['电子商务','教育','IT/互联网','金融','学生','其他'],
                textStyle: {
           color: 'rgba(255,255,255,.5)',
			fontSize:'12',
        }
    },
    series: [
        {
        	name:'年龄分布',
            type:'pie',
			center: ['50%', '42%'],
            radius: ['40%', '60%'],
            color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],	
            label: {show:false},
			labelLine: {show:false},
            data:[
                {value:5, name:'电子商务'},
                {value:1, name:'教育'},
                {value:6, name:'IT/互联网'},
                {value:2, name:'金融'},
                {value:1, name:'学生'},
                {value:1, name:'其他'},
            ]
        }
    ]
};
      
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
function echarts_33() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('fb3'));
option = {
	    title: [{
        text: '兴趣分布',
        left: 'center',
        textStyle: {
            color: '#fff',
			fontSize:'16'
        }

    }],
    tooltip: {
        trigger: 'item',
        formatter: "{a} <br/>{b}: {c} ({d}%)",
position:function(p){   //其中p为当前鼠标的位置
            return [p[0] + 10, p[1] - 10];
        }
    },
    legend: {
    top:'70%',
       itemWidth: 10,
        itemHeight: 10,
        data:['汽车','旅游','财经','教育','软件','其他'],
                textStyle: {
            color: 'rgba(255,255,255,.5)',
			fontSize:'12',
        }
    },
    series: [
        {
        	name:'兴趣分布',
            type:'pie',
			center: ['50%', '42%'],
            radius: ['40%', '60%'],
                   color: ['#065aab', '#066eab', '#0682ab', '#0696ab', '#06a0ab','#06b4ab','#06c8ab','#06dcab','#06f0ab'],	
            label: {show:false},
			labelLine: {show:false},
            data:[
                {value:2, name:'汽车'},
                {value:3, name:'旅游'},
                {value:1, name:'财经'},
                {value:4, name:'教育'},
                {value:8, name:'软件'},
                {value:1, name:'其他'},
            ]
        }
    ]
};
      
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
				
	
})
